package com.piece.core.framework.enums;

import java.io.Serializable;

@FunctionalInterface
public interface PieceDFunction<P, R> extends Serializable {

    R call(P var1) throws Exception;

    default R callWithRuntimeException(P parameter) {
        try {
            return this.call(parameter);
        } catch (Exception var2) {
            throw new RuntimeException(var2);
        }
    }
}
